package com.yanqu.road.server.cmd.activity.jieshi;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.JieShiProto;
import com.yanqu.road.pb.manor.FishPondProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C_CROSS_VISIT_OTHER_JIE_SHI_RESP, desc = "跨服查看他人街市信息响应")
public class CrossVisitOtherJieShiRespCmd extends CrossCommand {
    private JieShiProto.CrossJieShiVisitOtherRespMsg msg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = JieShiProto.CrossJieShiVisitOtherRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        YanQuMessage message = YanQuMessageUtils.buildMessage(ClientProtocol.U_JIESHI_VISIT_OTHER, msg.getMsg());
        MessageHelper.sendPacket(msg.getOriginServerId(), msg.getOriginPlayerId(), message);
    }

    @Override
    public void sendData() {

    }
}
